home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3c / timer_create.z / timer_create
Encoding:
Text File  |  1998-10-20  |  7.3 KB  |  133 lines

  1.  
  2.  
  3.  
  4. ttttiiiimmmmeeeerrrr____ccccrrrreeeeaaaatttteeee((((3333cccc))))                                              ttttiiiimmmmeeeerrrr____ccccrrrreeeeaaaatttteeee((((3333cccc))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _tttt_iiii_mmmm_eeee_rrrr______cccc_rrrr_eeee_aaaa_tttt_eeee - create a posix timer
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_iiii_gggg_nnnn_aaaa_llll_...._hhhh_>>>>
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_tttt_iiii_mmmm_eeee_...._hhhh_>>>>
  14.  
  15.      _tttt_iiii_mmmm_eeee_rrrr______cccc_rrrr_eeee_aaaa_tttt_eeee_((((_cccc_llll_oooo_cccc_kkkk_iiii_dddd______tttt _c_l_o_c_k__i_d_,,,, _ssss_tttt_rrrr_uuuu_cccc_tttt _ssss_iiii_gggg_eeee_vvvv_eeee_nnnn_tttt _****_e_v_p_,,,, _tttt_iiii_mmmm_eeee_rrrr______tttt _****_t_i_m_e_r_i_d_))))_;;;;
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      _tttt_iiii_mmmm_eeee_rrrr______cccc_rrrr_eeee_aaaa_tttt_eeee creates an interval timer for the calling process based on
  19.      the clock named by _c_l_o_c_k__i_d.  The new timer ID is recorded at the memory
  20.      address _t_i_m_e_r_i_d, and is unique for the calling process until the timer is
  21.      deleted.  A process may create up to {_TTTT_IIII_MMMM_EEEE_RRRR______MMMM_AAAA_XXXX} posix timers [see
  22.      _ssss_yyyy_ssss_cccc_oooo_nnnn_ffff(3C)].
  23.  
  24.      Supported clocks for _c_l_o_c_k__i_d are:
  25.  
  26.      _CCCC_LLLL_OOOO_CCCC_KKKK______RRRR_EEEE_AAAA_LLLL_TTTT_IIII_MMMM_EEEE The system's notion of the current time is obtained with
  27.                     this clock.  The time is expressed in seconds and
  28.                     nanoseconds since midnight (00:00) Coordinated Universal
  29.                     Time (UTC), January 1, 1970.  The resolution for of this
  30.                     clock is never worse than 100 HZ (which equals 10
  31.                     milliseconds).  The actual resolution of the clock depends
  32.                     on the timer capability of the underlying hardware (see
  33.                     timers(5)).
  34.  
  35.      _CCCC_LLLL_OOOO_CCCC_KKKK______SSSS_GGGG_IIII______FFFF_AAAA_SSSS_TTTT This clock has a higher resolution than _CCCC_LLLL_OOOO_CCCC_KKKK______RRRR_EEEE_AAAA_LLLL_TTTT_IIII_MMMM_EEEE and
  36.                     is available to privileged users only.  This clock is SGI
  37.                     specific and is not portable.
  38.  
  39.      The resolution of the clocks can be obtained by calling the _cccc_llll_oooo_cccc_kkkk______gggg_eeee_tttt_rrrr_eeee_ssss
  40.      function.
  41.  
  42.      The timer created can be started by calling the function _tttt_iiii_mmmm_eeee_rrrr______ssss_eeee_tttt_tttt_iiii_mmmm_eeee.
  43.      If the value of _e_v_p is non-NULL, then a notification specified in the _e_v_p
  44.      sigevent structure is sent to the process.
  45.  
  46.      If the _s_i_g_e_v__n_o_t_i_f_y member of _e_v_p is SIGEV_SIGNAL then the specified
  47.      signal is sent to the process and if the value is SIGEV_NONE no signal is
  48.      sent upon timer expiration.
  49.  
  50.      If the _s_i_g_e_v__n_o_t_i_f_y member of _e_v_p is SIGEV_THREAD then the function
  51.      _s_i_g_e_v__n_o_t_i_f_y__f_u_n_c_t_i_o_n will be called by a new thread (see pthreads(5))
  52.      with _s_i_g_e_v__v_a_l_u_e as the argument.  This thread is created when the event
  53.      arrives with the attributes specified in _s_i_g_e_v__n_o_t_i_f_y__a_t_t_r_i_b_u_t_e_s except
  54.      that it is automatically detached.  The calling process should ensure
  55.      there are sufficient resources to create the thread.
  56.  
  57.      If the _e_v_p argument is NULL, then the signal SIGALRM is sent to the
  58.      process, upon timer expiration.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ttttiiiimmmmeeeerrrr____ccccrrrreeeeaaaatttteeee((((3333cccc))))                                              ttttiiiimmmmeeeerrrr____ccccrrrreeeeaaaatttteeee((((3333cccc))))
  71.  
  72.  
  73.  
  74.      The timers are not inherited across the _ffff_oooo_rrrr_kkkk, _ssss_pppp_rrrr_oooo_cccc, or _eeee_xxxx_eeee_cccc system
  75.      calls.
  76.  
  77.      _tttt_iiii_mmmm_eeee_rrrr______cccc_rrrr_eeee_aaaa_tttt_eeee will fail if one or more of the following are true:
  78.  
  79.      [EAGAIN]       The calling process has reached its per-process timer
  80.                     creation limit of {_TTTT_IIII_MMMM_EEEE_RRRR______MMMM_AAAA_XXXX}.
  81.  
  82.      [EAGAIN]       The system lacks sufficient resources for queuing
  83.                     additional signals.
  84.  
  85.      [EINVAL]       The specified clock ID is invalid. Or the signal specified
  86.                     in the _e_v_p structure is invalid.
  87.  
  88.      [EPERM]        The process is not privileged to create a timer of the
  89.                     specified clock type.
  90.  
  91.      [EFAULT]       The address specified by either _t_i_m_e_r_i_d or _e_v_p is outside
  92.                     the range of the address space of the calling process.
  93.  
  94. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  95.      _tttt_iiii_mmmm_eeee_rrrr______dddd_eeee_llll_eeee_tttt_eeee(3C), _tttt_iiii_mmmm_eeee_rrrr______ssss_eeee_tttt_tttt_iiii_mmmm_eeee(3C), _tttt_iiii_mmmm_eeee_rrrr______gggg_eeee_tttt_tttt_iiii_mmmm_eeee(3C),
  96.      _tttt_iiii_mmmm_eeee_rrrr______gggg_eeee_tttt_oooo_vvvv_eeee_rrrr_rrrr_uuuu_nnnn(3C), _cccc_llll_oooo_cccc_kkkk______gggg_eeee_tttt_rrrr_eeee_ssss(2), _ssss_iiii_gggg_aaaa_cccc_tttt_iiii_oooo_nnnn(2), _ssss_yyyy_ssss_cccc_oooo_nnnn_ffff(3C),
  97.      _pppp_tttt_hhhh_rrrr_eeee_aaaa_dddd_ssss(5)
  98.  
  99. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  100.      Upon successful completion, a value of 0 is returned and the timer ID of
  101.      the created timer is set in the location pointed to by the _t_i_m_e_r_i_d
  102.      argument.  Otherwise, a value of -1 is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to
  103.      indicate the error.
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.